﻿using System;
using System.Xml.Linq;
using System.Collections.Generic;
using HigLabo.Net.Extensions;


namespace HigLabo.Net.Twitter
{
    /// <summary>
    /// 
    /// </summary>
    public class Url : ResponseObject
    {
        /// <summary>
        /// 
        /// </summary>
        public String DisplayUrl { set; get; }
        /// <summary>
        /// 
        /// </summary>
        public String ExpandedUrl { set; get; }
        /// <summary>
        /// 
        /// </summary>
        public Indices Indices { set; get; }
        /// <summary>
        /// 
        /// </summary>
        public String Value { set; get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public Url(String jsonText)
        {
            this.SetProperty(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public override void SetProperty(string jsonText)
        {
            var d = this.SetData(jsonText);

            this.Indices = new Indices(d.ToString("indices"));
            this.Value = d.ToString("url");
            this.DisplayUrl = d.ToString("display_url");
            this.ExpandedUrl = d.ToString("expanded_url");

        }
    }
}
